#pragma once
/*--------------------------------------------------------------------------------
 * Adaptive Intelligence - Native Win32 API Class Library
 * Version 2.00
 * 
 * File Cluster Map Entry Class
 *      Represents a single entry in a file cluster map.
 *------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------
 * System Imports
 *------------------------------------------------------------------------------*/
#include "stdafx.h"

using namespace System;
using namespace System::Collections;

namespace Adaptive
{
	namespace Foundation
	{
		namespace IO
		{
			/// <summary>
			/// Represents a single entry in a file cluster map.
			/// </summary>
			/// <remarks>
			/// Each instance of the class represents a single cluster or set of clusters in a file.
			/// </remarks>
			public ref class FileClusterMapEntry sealed
			{
			public:
				/*------------------------------------------------------------------------
				 * Constructor / Dispose / Destructor Methods
				 *----------------------------------------------------------------------*/
				#pragma region Constructor / Dispose / Destructor Methods
				/// <summary>
				/// Initializes a new instance of the class
				/// </summary>
				/// <remarks>
				/// This is the default constructor.
				/// </remarks>
				FileClusterMapEntry();
				/// <summary>
				/// Initializes a new instance of the class to the specified start position
				/// and size.
				/// </summary>
				/// <param name="logicalClusterNo">The logical cluster at which the block begins.</param>
				/// <param name="virtualClusterNo">The starting virtual cluster number at which the block begins.</param>
				/// <param name="numberOfClusters">The number of contiguous clusters represented by the map entry.</param>
				FileClusterMapEntry(__int64 logicalClusterNo, __int64 virtualClusterNo, __int64 numberOfClusters);
				#pragma endregion

				/*------------------------------------------------------------------------
				 * Public Properties
				 *----------------------------------------------------------------------*/
				#pragma region Public Properties
				/// <summary>
				/// Gets or sets the number of the cluster at which the free space begins.
				/// </summary>
				/// <value>
				/// The logical cluster number at which the free space begins.
				/// </value>
				property __int64 LogicalClusterNumber { __int64 get(); void set(__int64 value); }
				/// <summary>
				/// Gets or sets the number of the clusters the free space occupies.
				/// </summary>
				/// <value>
				/// The number of clusters being occupied.
				/// </value>
				property __int64 StartingVirtualClusterNumber { __int64 get(); void set(__int64 value); }
				/// <summary>
				/// Gets the number of bytes the free space occupies.
				/// </summary>
				/// <value>
				/// The number of bytes being occupied.
				/// </value>
				property __int64 NumberOfClusters { __int64 get(); void set(__int64 value); }
				/// <summary>
				/// Gets the number of bytes the free space occupies.
				/// </summary>
				/// <value>
				/// The number of bytes being occupied.
				/// </value>
				property __int64 NextVirtualClusterNumber { __int64 get(); }

				#pragma endregion

			private:
				/*------------------------------------------------------------------------
		         * Private Member Declarations
				 *----------------------------------------------------------------------*/
				#pragma region Private Member Declarations

				__int64 _logicalCluster;
				__int64 _startVirtualCluster;
				__int64 _numberOfClusters;

				#pragma endregion
			};
		}
    }
}
